Optimal. Leaf size=256 \[ \frac {b e^{-\frac {A}{B n}} (a+b x) \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{-1/n} \text {Ei}\left (\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{B n}\right )}{B^2 (b c-a d)^2 g^3 n^2 (c+d x)}-\frac {2 d e^{-\frac {2 A}{B n}} (a+b x)^2 \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{-2/n} \text {Ei}\left (\frac {2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{B n}\right )}{B^2 (b c-a d)^2 g^3 n^2 (c+d x)^2}-\frac {a+b x}{B (b c-a d) g^3 n (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 256, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 6, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {2551, 2357,
2367, 2337, 2209, 2347} \begin {gather*} -\frac {2 d (a+b x)^2 e^{-\frac {2 A}{B n}} \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{-2/n} \text {Ei}\left (\frac {2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{B n}\right )}{B^2 g^3 n^2 (c+d x)^2 (b c-a d)^2}+\frac {b (a+b x) e^{-\frac {A}{B n}} \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{-1/n} \text {Ei}\left (\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{B n}\right )}{B^2 g^3 n^2 (c+d x) (b c-a d)^2}-\frac {a+b x}{B g^3 n (c+d x)^2 (b c-a d) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2209
Rule 2337
Rule 2347
Rule 2357
Rule 2367
Rule 2551
Rubi steps
\begin {align*} \int \frac {1}{(c g+d g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx &=\int \frac {1}{(c g+d g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.33, size = 288, normalized size = 1.12 \begin {gather*} \frac {e^{-\frac {2 A}{B n}} (a+b x) \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{-2/n} \left (-B (b c-a d) e^{\frac {2 A}{B n}} n \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{2/n}+b e^{\frac {A}{B n}} \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{\frac {1}{n}} (c+d x) \text {Ei}\left (\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{B n}\right ) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-2 d (a+b x) \text {Ei}\left (\frac {2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{B n}\right ) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )\right )}{B^2 (b c-a d)^2 g^3 n^2 (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.05, size = 0, normalized size = 0.00 \[\int \frac {1}{\left (d g x +c g \right )^{3} \left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 652 vs.
\(2 (261) = 522\).
time = 0.37, size = 652, normalized size = 2.55 \begin {gather*} -\frac {{\left ({\left (B b^{2} c - B a b d\right )} n x + {\left (B a b c - B a^{2} d\right )} n\right )} e^{\left (\frac {2 \, {\left (A + B\right )}}{B n}\right )} + 2 \, {\left ({\left (A + B\right )} d^{3} x^{2} + 2 \, {\left (A + B\right )} c d^{2} x + {\left (A + B\right )} c^{2} d + {\left (B d^{3} n x^{2} + 2 \, B c d^{2} n x + B c^{2} d n\right )} \log \left (\frac {b x + a}{d x + c}\right )\right )} \operatorname {log\_integral}\left (\frac {{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )} e^{\left (\frac {2 \, {\left (A + B\right )}}{B n}\right )}}{d^{2} x^{2} + 2 \, c d x + c^{2}}\right ) - {\left ({\left (B b d^{2} n x^{2} + 2 \, B b c d n x + B b c^{2} n\right )} e^{\left (\frac {A + B}{B n}\right )} \log \left (\frac {b x + a}{d x + c}\right ) + {\left ({\left (A + B\right )} b d^{2} x^{2} + 2 \, {\left (A + B\right )} b c d x + {\left (A + B\right )} b c^{2}\right )} e^{\left (\frac {A + B}{B n}\right )}\right )} \operatorname {log\_integral}\left (\frac {{\left (b x + a\right )} e^{\left (\frac {A + B}{B n}\right )}}{d x + c}\right )}{{\left ({\left (B^{3} b^{2} c^{2} d^{2} - 2 \, B^{3} a b c d^{3} + B^{3} a^{2} d^{4}\right )} g^{3} n^{3} x^{2} + 2 \, {\left (B^{3} b^{2} c^{3} d - 2 \, B^{3} a b c^{2} d^{2} + B^{3} a^{2} c d^{3}\right )} g^{3} n^{3} x + {\left (B^{3} b^{2} c^{4} - 2 \, B^{3} a b c^{3} d + B^{3} a^{2} c^{2} d^{2}\right )} g^{3} n^{3}\right )} e^{\left (\frac {2 \, {\left (A + B\right )}}{B n}\right )} \log \left (\frac {b x + a}{d x + c}\right ) + {\left ({\left ({\left (A B^{2} + B^{3}\right )} b^{2} c^{2} d^{2} - 2 \, {\left (A B^{2} + B^{3}\right )} a b c d^{3} + {\left (A B^{2} + B^{3}\right )} a^{2} d^{4}\right )} g^{3} n^{2} x^{2} + 2 \, {\left ({\left (A B^{2} + B^{3}\right )} b^{2} c^{3} d - 2 \, {\left (A B^{2} + B^{3}\right )} a b c^{2} d^{2} + {\left (A B^{2} + B^{3}\right )} a^{2} c d^{3}\right )} g^{3} n^{2} x + {\left ({\left (A B^{2} + B^{3}\right )} b^{2} c^{4} - 2 \, {\left (A B^{2} + B^{3}\right )} a b c^{3} d + {\left (A B^{2} + B^{3}\right )} a^{2} c^{2} d^{2}\right )} g^{3} n^{2}\right )} e^{\left (\frac {2 \, {\left (A + B\right )}}{B n}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.94, size = 312, normalized size = 1.22 \begin {gather*} {\left (\frac {b {\rm Ei}\left (\frac {A}{B n} + \frac {1}{n} + \log \left (\frac {b x + a}{d x + c}\right )\right ) e^{\left (-\frac {A}{B n} - \frac {1}{n}\right )}}{B^{2} b c g^{3} n^{2} - B^{2} a d g^{3} n^{2}} - \frac {2 \, d {\rm Ei}\left (\frac {2 \, A}{B n} + \frac {2}{n} + 2 \, \log \left (\frac {b x + a}{d x + c}\right )\right ) e^{\left (-\frac {2 \, A}{B n} - \frac {2}{n}\right )}}{B^{2} b c g^{3} n^{2} - B^{2} a d g^{3} n^{2}} - \frac {\frac {{\left (b x + a\right )} b}{d x + c} - \frac {{\left (b x + a\right )}^{2} d}{{\left (d x + c\right )}^{2}}}{B^{2} b c g^{3} n^{2} \log \left (\frac {b x + a}{d x + c}\right ) - B^{2} a d g^{3} n^{2} \log \left (\frac {b x + a}{d x + c}\right ) + A B b c g^{3} n + B^{2} b c g^{3} n - A B a d g^{3} n - B^{2} a d g^{3} n}\right )} {\left (\frac {b c}{{\left (b c - a d\right )}^{2}} - \frac {a d}{{\left (b c - a d\right )}^{2}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {1}{{\left (c\,g+d\,g\,x\right )}^3\,{\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________